//
//  PersonalViewModel.m
//  HonlivApp
//
//  Created by admin on 2017/6/26.
//  Copyright © 2017年 honliv. All rights reserved.
//

#import "PersonalViewModel.h"

@implementation PersonalViewModel

-(void)getPersonalFileSuccess:(void (^)(PersonalFileModel *model))completion{
    User *user = [User currentUser];
    NSDictionary *info = @{@"db":@"apilkoa",@"SqlNo":@"12",@"ygbh":user.userId,@"Page":@"1"};
    NSString *url = [NSString stringWithFormat:@"%@%@",HOSPITAL_URL,COMMON_URL];
    [SVProgressHUD showWithStatus:@"正在加载中..."];
    [NetWorker getCommonDatasWithURLStr:url body:info success:^(id result) {
        NSArray *infos = [JsonHelper arrayWithJsonString:result[@"Entity"]];
        NSDictionary *dic = infos[0];
        PersonalFileModel *info = [PersonalFileModel personalModelWithDictionary:dic];
        completion(info);
    } failure:^(id result) {
        [SVProgressHUD showErrorWithStatus:@"获取个人信息失败"];
    }];

}

@end
